package com.arvato.common.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**   
 * 
 * @author: smallking
 * 
 * @Descibe: 注册拦截器，配置拦截路径
 * 
 * @Date: 2018年6月5日  上午11:42:08
 */
@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {    
    
    @Override    
    public void addInterceptors(InterceptorRegistry registry) {    
        //注册自定义拦截器，添加拦截路径和排除拦截路径    
        registry.addInterceptor(new ArvatoInterceptor()).addPathPatterns("/**");
        super.addInterceptors(registry);
    }    
}